<div id="content">
                    	<h3>Danh sách tin tức</h3>
                        
                        <div id="contentFunc">
                        	<div class="create">
                                <a href="<?php echo base_url() ?>index.php/Quanlytintuc/them">Thêm tin tức</a>
                            </div>
                              
                            <div class="search">
								<?php 
                                    $attributes = array('id'=>'frmTT','name'=>'frmTT','method'=>'get');
                                    echo form_open_multipart('Quanlytintuc/index',$attributes);	         
							    ?>
                            	<label>Từ khóa:</label>                          
                                <input type="search" id="txtSearch" name="key"/>
                                <input type="submit" id="btnSearch" value="Tìm"/>
                                </form>
                            </div>
                             <div class="pageList">
                             	<?php 
									if(isset($pages))
									{
										for ( $p = 1; $p <=$pages+1; $p ++ )
										{
											if(!empty($key))	
											{
											echo "<a href='".base_url()."index.php/Quanlytintuc/index?key={$key}&page={$p}'>{$p}</a>";
											}
											else
											echo "<a href='".base_url()."index.php/Quanlytintuc/index?page={$p}'>{$p}</a>";
										}
									}
								?>
                             </div>
                            <div id="dataTT">
                             	<?php 
									if(!empty($tintucs))
									{
										for($stt=0 ;$stt<count($tintucs);$stt++)
										{
											$tin=$tintucs[$stt];
											echo "<div class='item-tin'>
													<img id='anhTinTuc' src='".base_url().$tin['hinh']."' alt='' height='100' width='100' />
													<div id='capnhatTT'>							  
														<div class='tacgia'>Tác giả: ".$tin['tacgia']."</div>
													  
														<div class='ngaydang'>Ngày đăng: ".$tin['ngaydang']."</div>
													  
														<div class='nguoidang'>Người cập nhật:  ".$tin['tentaikhoan']."</div>";
													
														echo "<div class='icon-updateTT'>";
															echo "<a href='". base_url()."index.php/Quanlytintuc/chitiet/{$tin['matt']}'>";
																echo "<img src='".base_url()."images/sdetail.png' alt='Xem'/>";
															echo "</a>";
												
															echo "<a href='".base_url()."index.php/Quanlytintuc/sua/{$tin['matt']}'>";
																echo "<img src='".base_url()."images/sedit.png' alt='Sửa'/>";
															echo "</a>";
												
															if(!empty($key))	
															{
																echo "<a href='".base_url()."index.php/Quanlytintuc/xoa/{$tin['matt']}?key={$key}&page={$page}'>";
															}
															else
																echo "<a href='".base_url()."index.php/Quanlytintuc/xoa/{$tin['matt']}?page={$page}'>";
																	echo "	<img src='".base_url()."images/sdelete.png' alt='Xóa'/></a>";
														echo "</div>";
													echo "</div>";
													
													echo "<div id='ndTinTuc'>
														<div class='vi'>
															<h2 class='h2TieuDeTT'>".$tin['tieude']."</h2>
															
															<div class='tomtat'>".$tin['tomtat']."</div>
														</div>
													  	<hr id='hrTinTuc'/>
														<div class='en'>
															<h2 class='h2TieuDeTT'>".$tin['tieude_en']."</h2>
															<div class='tomtat_en'>".$tin['tomtat_en']."</div>
														</div>
													</div>";
											echo "</div>";
										}
									}
								?>
                            </div>
                        </div>
                    </div>
            </div>
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            